import requset from '@/utils/wangyiRequest'

export default {
  // 获取默认关键字和热门关键字
  reqGetHotKeyWords() {
    return requset.get('/xhr/search/init.json')
  },

  // 实时关键字列表
  reqPostTimeKeyWords(keywordPrefix: string) {
    return requset.post(`/xhr/search/searchAutoComplete.json?keywordPrefix=${keywordPrefix}`)
  },

  // 搜索某个关键字，获取返回数据
  reqGetSearch(keyword: string) {
    return requset.get(
      `/xhr/search/search.json?__timestamp=1670235925214&keyword=${keyword}&sortType=0&descSorted=false&categoryId=0&matchType=0&floorPrice=-1&upperPrice=-1&size=40&itemId=0&stillSearch=false&searchWordSource=1&needPopWindow=true&_stat_search=userhand`
    )
  }
}
